import Vue from 'vue';
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    count: 3,
    home3isshow: true,
    account: {
    }
  },
  mutations: {
    increment (state, param) {
      state.count = state.count + param
    },
    jian (state, param) {
      state.count = state.count - param
    },
    insertuser (state, account) {
      state.account = account
    },
    set_home3isshow (state, param) {
      this.state.home3isshow = param
    }
  },
  getters: {
    countValue: function (state) {
      return '当前count值为' + state.count
    },
    get_home3isshow: function (state) {
      return state.home3isshow
    }
  }
})
export default store
